using System;
using FreeSql.DataAnnotations;

namespace Colorful.Furniture.PermissionManagement
{

    /// <summary>
    /// 管理员日志
    /// </summary>
    [Table(Name = "sys_manager_log")]
    public partial class SysManagerLog
    {

        /// <summary>
        /// 编码
        /// </summary>
        [Column(Name = "id", IsPrimary = true)]
        public Guid Id { get; set; }

        /// <summary>
        /// 管理员编码
        /// </summary>
        [Column(Name = "manager_id")]
        public Guid? ManagerId
        {
            get => _ManagerId; set
            {
                if (_ManagerId == value) return;
                _ManagerId = value;
                Manager = null;
            }
        }
        private Guid? _ManagerId;

        /// <summary>
        /// 操作
        /// </summary>
        [Column(Name = "action", StringLength = 50)]
        public string Action { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        [Column(Name = "add_time")]
        public DateTime? AddTime { get; set; }

        [Column(Name = "browser", StringLength = 50)]
        public string Browser { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [Column(Name = "description", StringLength = 50)]
        public string Description { get; set; }

        /// <summary>
        /// 访问地址
        /// </summary>
        [Column(Name = "url", StringLength = 100)]
        public string Url { get; set; }

        /// <summary>
        /// 管理员用户名
        /// </summary>
        [Column(Name = "user_name", StringLength = 150)]
        public string UserName { get; set; }


        #region 外键 => 导航属性，ManyToOne/OneToOne


        public virtual SysManager Manager { get; set; }

        #endregion

        #region 外键 => 导航属性，ManyToMany

        #endregion
    }

}
